import colors from 'vuetify/es5/util/colors'

export default {
  head: {
    titleTemplate: '%s - web',
    title: '王者荣耀',
    htmlAttrs: {
      lang: 'en'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' },
      { name: 'format-detection', content: 'telephone=no' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ],
    script: [
      { src: '/js/flexible.js', type: 'text/javascript', charset:'utf-8' }
    ],
  },

  css: [
    "assets/style/global.scss",
    "swiper/swiper-bundle.css"
  ],

  plugins: [
    { src: '~/plugins/vue-awesome-swiper', ssr: true },
    { src: '~/plugins/axios'}
  ],

  components: true,

  buildModules: [
    // https://go.nuxtjs.dev/vuetify
    ['@nuxtjs/vuetify', {
      theme: { dark: false }
    }]
  ],

  modules: [
    '@nuxtjs/axios'
  ],

  // Vuetify module configuration: https://go.nuxtjs.dev/config-vuetify
  vuetify: {
    customVariables: ['~/assets/variables.scss'],
    theme: {
      dark: true,
      themes: {
        dark: {
          primary: colors.blue.darken2,
          accent: colors.grey.darken3,
          secondary: colors.amber.darken3,
          info: colors.teal.lighten1,
          warning: colors.amber.base,
          error: colors.deepOrange.accent4,
          success: colors.green.accent3
        }
      }
    }
  },

  build: {
    // 配置 rem
    postcss: [
      require('postcss-px2rem')({
        remUnit: 36
      })
    ],
  },
}
